<template>
  <page-layout>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div>
      <a-form @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
            <a-col :md="6" :sm="12">
				<a-form-item label="客户名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
				  <a-input style="width:100%;" placeholder="请输入客户名称" v-model="queryParam.customerName"></a-input>
				</a-form-item>
			  </a-col>
			  <a-col :md="6" :sm="8">
			    <a-form-item label="收款单编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
			      <a-input style="width:100%;" placeholder="请输入收款单编号" v-model="queryParam.num"></a-input>
			    </a-form-item>
			  </a-col>
          <a-col :md="6" :sm="8">
            <a-form-item>
              <a-button type="primary" @click="searchQuery()" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset()" icon="reload" style="margin-left: 8px">重置</a-button>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>

    <!-- table区域-begin -->
    <div>
      <vxe-grid
        id="customerBillsList"
        keep-source
        ref="vxeTable"
        :height="null"
        v-bind="options"
        @checkbox-change="onSelectChange"
        @checkbox-all="onSelectChange"
        @page-change="handlePageChange"
      >

    </vxe-grid>
    </div>
    <!-- table区域-end -->
  </a-card>
  </page-layout>
</template>

<script>
import PageLayout from '@/layouts/PageLayout'
import { VxeTableMixin } from '@/mixins/VxeTableMixin'

export default {
  name: "customerReceiptsList",
  components: {
    PageLayout
  },
  mixins: [VxeTableMixin],
  data() {
    return {
      columns: [
        {
          type: 'seq',
          width: 60,
          field: 'seq'
        },
        {
          title: '收款单编号',
          field: 'num',
          width: 150
        },
        {
          title: '客户名称',
          field: 'customerName',
          width: 200
        },
        {
          title: '合同名称',
          field: 'contractName',
          width: 200
        },
        {
          title: '收款方式',
          field: 'payType',
          formatter: 'dictText',
          width: 100
        },
        {
          title: '收款日期',
          field: 'payTime',
          width: 100
        },
        {
          title: '收款金额',
          field: 'receiptMoney',
          width: 100
        },
        {
          title: '客户所有人',
          field: 'ownerCustomer',
          formatter: 'dictText',
          width: 150
        },
        {
          title:'所属公司',
          align:"center",
          field: 'company',
          width: 200
        },
        {
          title:'所属部门',
          align:"center",
          field: 'createDept',
          formatter: 'dictText',
          width: 200
        },
        {
          title: '创建人',
          field: 'createBy',
          formatter: 'dictText',
          width: 150
        },
        {
          title: '创建时间',
          field: 'createTime',
          width: 150
        },
        {
          title: '更新时间',
          field: 'updateTime',
          width: 150
        }
      ],
      url: {
        list: '/report/customerreceipts',
      },
      // 查询参数
      queryParam: {},
      selectedRowKeys: [],
      selectedRows: [],
      toggleSearchStatus: false,
      customTableToolbar: {
        buttons: [
        ]
      }
    }
  },
  computed: {
    importExcelUrl: function() {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    },
    rowSelection() {
      return {
        selectedRowKeys: this.selectedRowKeys,
        onChange: this.onSelectChange
      }
    }
  },
  created() {
  },
  methods: {
  }
}
</script>
